package com.admin.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.admin.bean.VisitLogBean;
import com.admin.dao.VisitLogDao;

/**   
 * @Title: VisitLogService.java
 * @Package com.admin.service
 * @Description: 
 * @author Jason
 * @date 2010-12-16 上午10:40:42    
 * @version    
 */

@Service
public class VisitLogService {

	@Autowired private VisitLogDao visitLogDao;
	
	/**
	  * @Title: addVisitLog
	  * @Description: 添加访问日志
	  * @param log
	  * @return
	  * @throws
	 */
	public int addVisitLog(VisitLogBean log){
		return visitLogDao.addVisitLog(log);
	}
	
	/**
	  * @Title: findCount
	  * @Description:查询日志总数 
	  * @param userId
	  * @param startTime
	  * @param endTime
	  * @return
	  * @throws
	 */
	public int findCount(int userId,String startTime,String endTime){
		return visitLogDao.findCount(userId, startTime, endTime);
	}
	
	/**
	  * @Title: findByCondition
	  * @Description:分页查询日志 
	  * @param userId
	  * @param startTime
	  * @param endTime
	  * @param start
	  * @param pageSize
	  * @return
	  * @throws
	 */
	public List<VisitLogBean> findByCondition(int userId,String startTime,String endTime,int start,int pageSize){
		return visitLogDao.findByCondition(userId, startTime, endTime, start, pageSize);
	}
}
